package org.swidgets.base.sbutton;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Widget;

 class SimpleButton extends Widget {
	public Element myFrame;
	public String id;
	private static int countControl = 0;
		
	public SimpleButton(){	
		id = "cornice_" + countControl++;
		
		String innerTable= "<table>" +
				"<tr>" +
				"	<td>" +
				"		<div id='" + id  + "'>&nbsp;" +
				"		</div>" +
				"	</td>" +
				"</tr>" +
				"</table>";
				
		myFrame = DOM.createDiv();
		DOM.setInnerHTML(myFrame, innerTable);
		
		setElement(myFrame);
	}
	
	public void setText(String string){
		DOM.setInnerHTML(DOM.getElementById(id), string);
	}
	
	

}
